package com.zhongkai.controller;

import com.zhongkai.app.service.LikeService;
import com.zhongkai.model.utils.ZhongkaiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class LikeController {


    @Autowired
   private LikeService likeService;


    /**
     * 设备号模糊查询
     *
     * @param link_uuid   模糊的设备uuid
     */
    @RequestMapping(value = "/like/unit_code", produces = "application/json;charset=utf-8")
    @ResponseBody
    public ZhongkaiResult likeUnit(String link_uuid) {

        ZhongkaiResult result = likeService.likeUnit(link_uuid);

        return result;
    }



    /**
     * 设备号模糊查询
     *
     * @param like_name   模糊的人员姓名
     */
    @RequestMapping(value = "/like/app_user", produces = "application/json;charset=utf-8")
    @ResponseBody
    public ZhongkaiResult likeAppUser(String like_name) {

        ZhongkaiResult result = likeService.likeAppUser(like_name);

        return result;
    }



    /**
     * 产品名称模糊查询
     *
     * @param product_name   模糊的产品名称
     */
    @RequestMapping(value = "/like/supplier_product", produces = "application/json;charset=utf-8")
    @ResponseBody
    public ZhongkaiResult likeSupplierProduct(String product_name) {

        ZhongkaiResult result = likeService.likeSupplierProduct(product_name);

        return result;
    }

    /**
     * 设备用户名模糊查询
     *
     * @param user_name   模糊的用户姓名
     */

    @RequestMapping(value = "/like/unit_user_name", produces = "application/json;charset=utf-8")
    @ResponseBody
    public ZhongkaiResult likeUnitUserName(String user_name) {

        ZhongkaiResult result = likeService.likeUnitUserName(user_name);

        return result;
    }





    /**
     * 公司产品名称模糊查询
     *
     * @param setmode_name   模糊的公司产品名称
     */
    @RequestMapping(value = "/like/setmode_name", produces = "application/json;charset=utf-8")
    @ResponseBody
    public ZhongkaiResult likeSetmodeName(String setmode_name) {

        ZhongkaiResult result = likeService.likeSetmodeName(setmode_name);

        return result;
    }



    /**
     * 公司产品名称模糊查询
     *
     * @param uuid 设备uuid
     */
    @RequestMapping(value = "/like/unit_ip", produces = "application/json;charset=utf-8")
    @ResponseBody
    public ZhongkaiResult quunit(String uuid) {

        ZhongkaiResult result = likeService.quunit(uuid);

        return result;
    }


}
